package com.kantboot.business.gc.repository;

import com.kantboot.business.gc.domain.dto.BusGcSwiperSearchDTO;
import com.kantboot.business.gc.domain.entity.BusGcSwiper;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface BusGcSwiperRepository extends JpaRepository<BusGcSwiper, Long> {

    //按照sort排序
    @Query("SELECT t FROM BusGcSwiper t ORDER BY t.sort DESC")
    Page getBodyData(@Param("param") BusGcSwiperSearchDTO param, Pageable pageable);
}
